package com.itboye.boyeshoping.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.view.ViewGroup;

import com.itboye.boyeshoping.fragment.ViewPagerFragment;

import java.util.List;

/**
 * Created by Administrator on 2018/7/6 0006.
 */

public class ViewPagerFragmentsAdapter extends FragmentPagerAdapter {
    List<ViewPagerFragment> list;
    FragmentManager fm;
    public ViewPagerFragmentsAdapter(FragmentManager fm, List<ViewPagerFragment> list) {
        super(fm);
        this.fm=fm;
        this.list=list;

    }

    @Override
    public ViewPagerFragment getItem(int position) {

        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }

}
